package com.huanmeiqi.demo.quartz.demo01;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @author cq.Wang
 * @date 2018/6/13 16:06
 * @description
 */
public class MyJob extends QuartzJobBean {

    private Logger logger = LoggerFactory.getLogger(getClass());

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("-------hello,quartz. I am {}------",this.name);
    }
}
